package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iotechn.unimall.data.domain.RunningAdminApplyDO;
import com.iotechn.unimall.data.dto.RunningAdminApplyDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by rize on 2019/7/1.
 */
public interface RunningAdminApplyMapper extends BaseMapper<RunningAdminApplyDO> {

    /**
     * 查询管理员申请记录列表
     * @param page
     * @return
     */
    List<RunningAdminApplyDTO> selectApplyPage(Page<RunningAdminApplyDTO> page,@Param("runningGroupId") Long runningGroupId);

    void deleteByUserId(@Param("userId") Long userId);

    int deleteByUserIdAndGroupId(@Param("userId") Long userId,@Param("runningGroupId") Long runningGroupId);

}
